package common.activiti.form;

import org.activiti.engine.form.AbstractFormType;
import org.apache.commons.lang3.ObjectUtils;

/**
 * double表单字段类型
 *
 * @author henryyan
 */
public class DoubleFormType extends AbstractFormType {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2579849841018784942L;

	@Override
	public String getName() {
		return "double";
	}

	@Override
	public Object convertFormValueToModelValue(String propertyValue) {
		return new Double(propertyValue);
	}

	@Override
	public String convertModelValueToFormValue(Object modelValue) {
		return ObjectUtils.toString(modelValue);
	}

}
